<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .parent{
            width: 200px;
            height: 200px;
            background: red;
            position: relative;
        }
        .one{
            width: 50px;
            height: 100px;
            background: blue;
            position: absolute;
            z-index: 100;
        }
        .two{
            width: 100px;
            height: 50px;
            background: green;
            position: absolute;
            z-index: 102;
        }
        /* z-index设置绝对定位元素的堆叠顺序 */
    </style>
</head>
<body>
   <div class="parent">
       <div class="one">
       </div>
       <div class="two">
       </div>
   </div> 
</body>
</html>